import api from '@/services/axios';

export default {
  // 下属医院列表
  apiGetHospitalList: params => api.get('/user-auth/hospital/page', { params }),
  // 修改医院 启用停用医院
  apiUpdateHospital: params => api.put('/user-auth/hospital', params),
  // 新建医院
  apiAddHospital: params => api.post('/user-auth/hospital', params),
  // 删除医院
  apiDeleteHospital: params => api.delete(`/user-auth/hospital/${params}`),
  // 判断医院名称是否存在
  apiGetHospitalExist: params => api.get('/user-auth/hospital/name/exists', { params }),
  // 获取医院信息详情
  apiGetHospitalDetail: params => api.get(`/user-auth/hospital/info/${params}`),
  // 删除上传图片
  apiDeleteFile: params => api.delete(`/user-auth/hospital/remove-file/${params}`),
  // 医院管理员列表
  apiGetHospitalManagerList: params => api.get('/user-auth/hospital/manager/page', { params }),
  // 移除医院管理员角色
  apiDeleteManagerRole: params => api.delete('/user-auth/hospital/manager/role', params),
  // 授权管理列表
  // apiGetAuthManageList: params => api.get('/user-auth/hospital/business-module/page', { params }),
  apiGetAuthManageList: params => api.get('/user-auth/hospital/perms-business-module/page', { params }),
  // 授权 取消授权
  // apiUpdateAuthModule: params => api.put('/user-auth/hospital/business-module/auth', params),
  apiUpdateAuthModule: params => api.put('/user-auth/hospital/perms-business-module/auth', params),

  // 邀请管理员
  apiAddManager: params => api.post('/user-auth/hospital/manager', params),
  // 授权 取消授权
  apiUpdateManageClose: params => api.put('/user-auth/hospital/manager/close', params),
  // 获取医院一些权限是否开放
  // apiGetRecipeJurisdiction: params => api.get('/user-auth/hospital/setting', { params }),

  apiGetRecipeJurisdiction: params => Promise.resolve({errCode: 0,data:{a:1}}),

  // 设置医院中药处方权限是否开放
  apiSetRecipeJurisdiction: params => api.put('/user-auth/hospital/setting', params),
  // 获取短信签名的列表
  apiGetMessageList: params => api.get('/user-auth/hospital/listAvailableSign', { params }),
  // 获取erp设置
  apiGetIsOpenERP: params => api.get(`/user-auth/hospital/getIsOpenErp`, { params }),
  // 同步cdss数据
  apiGetSyncCdss: params => api.get(`/function/setting/syncCdssData`, { params }),
  // 获取收银台配置
  apiGetPaymentConf: params => api.get(`/payment-conf/${params.orgId}/${params.hospId}`),
  // 修改收银台配置
  apiPostPaymentConf: params => api.post(`/payment-conf/modify`, params),
  // 获取工作站配置
  apiGetWork: params => api.get(`/workbench/workList/config/state`, { params }),
  // 修改工作站配置
  apiPostWork: params => api.post(`/workbench/workList/config`, params),
  // 医院疾病库初始化
  apiInitWork: params => api.post(`/function/setting/addDiseaseLabel`, params)
};
